<template>
  <div class="gonglue">
    <div class="top">
      <span>英雄攻略</span>
      <span>更多</span>
    </div>
    <div class="body">
      <div class="left">
        <div v-for="v in arr" :key="v.iId" :title="v.sTitle">
          <img height="114px" :src="v.sCoverList[0].url" alt="" />
          <div>{{ v.sTitle }}</div>
          <div>
            <img
              src="/img/u=30380529,3879027376&fm=253&fmt=auto&app=138&f=JPEG.webp"
              alt=""
            />
          </div>
          <div  >{{ v.iTotalPlay }}</div>
        </div>
      </div>
      <div class="right">
        <ul>
          <li v-for="v in arr1.slice(0, 10)" :key="v.iId">
            <span>图文</span>
            <span>{{ v.sTitle }}</span>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: [],
      arr1: [],
    };
  },
  mounted() {
    this.axios
      .get(
        "/api/cmc/cross?serviceId=18&filter=tag&sortby=sIdxTime&source=web_pc&limit=6&logic=or&typeids=2&exclusiveChannel=4&exclusiveChannelSign=fed22e16698f3c9eeefcfe5c9e52d7c0&time=1649165023&tagids=871%2C619"
      )
      .then((res) => {
        console.log(res.data.data.items, 1111111);
        this.arr = res.data.data.items;
      });
    this.axios
      .get(
        "/api/cmc/cross?serviceId=18&filter=tag&sortby=sIdxTime&source=web_pc&limit=16&logic=or&typeids=1%2C2&exclusiveChannel=4&exclusiveChannelSign=a924f2ffb8525c638847d46d449c8727&time=1649166349&tagids=862%2C619"
      )
      .then((res) => {
        console.log(res.data.data.items, 22222);
        this.arr1 = res.data.data.items;
      });
  },
};
</script>

<style lang="scss" scoped>
.gonglue {
  width: 1200px;
  margin: 0 auto;
  //   border: 1px solid red;
  padding-top: 60px;
  .top {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    span {
      background-image: url("/public/img/icon-bg.png");
      background-repeat: no-repeat;
      &:first-child {
        font-weight: bold;
        font-size: 21px;
        background-position: -8px -114px;
        padding-left: 28px;
      }
      &:last-child {
        font-size: 14px;
        background-position: -11px -45px;
        padding-left: 20px;
      }
    }
  }
  .body {
    background-color: #fff;
    height: 400px;
    display: flex;
    justify-content: space-between;
    .left {
      width: 622px;
      // border: 1px solid pink;
      display: flex;
      flex-wrap: wrap;
      > div {
        cursor: pointer;
        width: 190px;
        height: 170px;
        // border: 1px solid red;
        overflow: hidden;
        margin: 0 12px 24px 0;
        position: relative;
        &:hover > div:nth-child(3) {
          z-index: 1;
        }
        img {
          width: 100%;
          border-radius: 2px;
        }
        > div:nth-child(2) {
          font-size: 14px;
        }
        > div:nth-child(3) {
          text-align: center;
          position: absolute;
          left: 0;
          right: 0;
          background-color: rgba(0, 0, 0, 0.452);
          top: 0;
          height: 114px;
          padding-top: 40px;
          z-index: -1;
          img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
          }
        }
        > div:last-child {
          font-size: 12px;
          position: absolute;
          background-color: rgba(0, 0, 0, 0.518);
          left: 0;
          right: 0;
          top: 98px;
          color: white;
          background-position: -252px -62px;
          padding-left: 20px;
          background-image: url("/public/img/index.png");
        }
      }
    }
    .right {
      width: 570px;
      //   border: 1px solid greenyellow;
      ul {
        li {
          //   border: 1px solid red;
          margin-bottom: 14px;
          font-size: 14px;
          > span:first-child {
            padding: 0 10px;
            background-color: rgb(245, 245, 245);
            color: gray;
            margin-right: 20px;
          }
          > span:last-child {
            cursor: pointer;
            &:hover {
              text-decoration: underline;
            }
          }
        }
      }
    }
  }
}
</style>